<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<script type="text/javascript">
	
	//字符串的声明
	// '' "" ``
	let a = ""
	let b = ''
	//模板字符串  ${变量}
	let d = '孙悟空'
	let c = `hello world ${d}`
	console.log(c) //hello world 孙悟空


	// 构造函数的声明方式
	let str = new String('hi')
	console.log(str + d)

	//length返回字符串长度
	console.log(str.length) //2

	str[0] = '1' //只读不能改
	console.log(str)
</script>
</body>
</html>